home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2003 November / PCWK1103B.iso / DesignCAD 3D Max PLUS trial 30 / DATA1.CAB / Example_Files / Sample_Macros / Close Axis.d3m < prev    next >
Encoding:
Text File  |  2003-09-29  |  1021 b   |  76 lines

  1. setpoint "Set a point." 1
  2. pointval x1 y1 z1 1
  3. window 10,50    
  4. locate 3, 10
  5. input "Enter the height " h
  6. input " width " w
  7. input " depth " d
  8. wclose
  9. h1=y1+h
  10. w1=x1+w
  11. d1=z1+d
  12.  
  13.   >Box
  14. {
  15. <pointxyz [x1,y1,z1]
  16. <pointxyz [w1,h1,d1]
  17. }
  18. if (d1<z1) then z2=d1
  19. if (d1>=z1) then z2=z1
  20. if not(w = 0) then 
  21. >Dimension
  22. {
  23.     
  24.     <type 0
  25.     <Arrowhead 3
  26.     <Arrowsize 1
  27.     <Axis 0
  28.     <Size 1
  29.     <fix 0
  30.     <Format 0
  31.     <Precision 2
  32.     <pointxyz [x1,y1,z2]
  33.     <pointxyz [x1+w,y1,z2]
  34.     <pointxyz [x1,y1+(-w/w)*5,z2]
  35.  
  36. }
  37. end if
  38.  
  39. if not(h = 0) then 
  40. >Dimension
  41. {
  42.     
  43.     <type 0
  44.     <Arrowhead 3
  45.     <Arrowsize 1
  46.     <Axis 0
  47.     <Size 1
  48.     <fix 0
  49.     <Format 0
  50.     <Precision 2
  51.     <pointxyz [x1,y1,z2]
  52.     <pointxyz [x1,y1+h,z2]
  53.     <pointxyz [x1+(-h/h)*5,y1,z2]
  54.  
  55. }
  56. end if
  57. if (x1 >= w1) then x2=x1
  58. if (w1 > x1) then x2=w1
  59. if not(d = 0) then 
  60. >Dimension
  61. {
  62.     
  63.     <type 0
  64.     <Arrowhead 3
  65.     <Arrowsize 1
  66.     <Axis 0
  67.     <Size 1
  68.     <fix 0
  69.     <Format 0
  70.     <Precision 2
  71.     <pointxyz [x2,y1,z1]
  72.     <pointxyz [x2,y1,z1+d]
  73.     <pointxyz [x2,y1+(-d/d)*5,z1]
  74.  
  75. }
  76. end if